/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package fjnu.dao.factory;

import fjnu.bll.Cache;
import fjnu.dao.AbstractObject;

/**
 *
 * @author jlh
 */
public abstract class AbstractMapper implements IMapper {

    public void registerObserver(AbstractObject obj)
    {
        obj.addMapper(this);
    }
    public abstract AbstractObject getObjectByID(int ID);
      
    public void addObjectToCache(AbstractObject ao)
    {
        registerObserver(ao);
        Cache.getInstance().addObjectToLRU1(ao);
    }
}
